Optimal. Leaf size=138 \[ -\frac{(c-d) (c+7 d) \tanh ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{2} \sqrt{a \sin (e+f x)+a}}\right )}{2 \sqrt{2} a^{3/2} f}-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a \sin (e+f x)+a)^{3/2}}+\frac{d (c-5 d) \cos (e+f x)}{2 a f \sqrt{a \sin (e+f x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.215946, antiderivative size = 138, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.148, Rules used = {2760, 2751, 2649, 206} \[ -\frac{(c-d) (c+7 d) \tanh ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{2} \sqrt{a \sin (e+f x)+a}}\right )}{2 \sqrt{2} a^{3/2} f}-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a \sin (e+f x)+a)^{3/2}}+\frac{d (c-5 d) \cos (e+f x)}{2 a f \sqrt{a \sin (e+f x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2760
Rule 2751
Rule 2649
Rule 206
Rubi steps
\begin{align*} \int \frac{(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^{3/2}} \, dx &=-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}-\frac{\int \frac{-\frac{1}{2} a \left (c^2+5 c d-2 d^2\right )+\frac{1}{2} a (c-5 d) d \sin (e+f x)}{\sqrt{a+a \sin (e+f x)}} \, dx}{2 a^2}\\ &=\frac{(c-5 d) d \cos (e+f x)}{2 a f \sqrt{a+a \sin (e+f x)}}-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}+\frac{((c-d) (c+7 d)) \int \frac{1}{\sqrt{a+a \sin (e+f x)}} \, dx}{4 a}\\ &=\frac{(c-5 d) d \cos (e+f x)}{2 a f \sqrt{a+a \sin (e+f x)}}-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}-\frac{((c-d) (c+7 d)) \operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{a+a \sin (e+f x)}}\right )}{2 a f}\\ &=-\frac{(c-d) (c+7 d) \tanh ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{2} \sqrt{a+a \sin (e+f x)}}\right )}{2 \sqrt{2} a^{3/2} f}+\frac{(c-5 d) d \cos (e+f x)}{2 a f \sqrt{a+a \sin (e+f x)}}-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}\\ \end{align*}
Mathematica [C] time = 0.332217, size = 239, normalized size = 1.73 \[ \frac{\left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right ) \left ((1+i) (-1)^{3/4} \left (c^2+6 c d-7 d^2\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^2 \tanh ^{-1}\left (\left (\frac{1}{2}+\frac{i}{2}\right ) (-1)^{3/4} \left (\tan \left (\frac{1}{4} (e+f x)\right )-1\right )\right )+2 (c-d)^2 \sin \left (\frac{1}{2} (e+f x)\right )-(c-d)^2 \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )-4 d^2 \cos \left (\frac{1}{2} (e+f x)\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^2+4 d^2 \sin \left (\frac{1}{2} (e+f x)\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^2\right )}{2 f (a (\sin (e+f x)+1))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.78, size = 316, normalized size = 2.3 \begin{align*} -{\frac{1}{4\,f\cos \left ( fx+e \right ) } \left ( \sin \left ( fx+e \right ) \left ( \sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}}{2}\sqrt{a-a\sin \left ( fx+e \right ) }{\frac{1}{\sqrt{a}}}} \right ) a{c}^{2}+6\,\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{2}}{\sqrt{a}}} \right ) acd-7\,\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{2}}{\sqrt{a}}} \right ) a{d}^{2}+8\,\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{a}{d}^{2} \right ) +\sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}}{2}\sqrt{a-a\sin \left ( fx+e \right ) }{\frac{1}{\sqrt{a}}}} \right ) a{c}^{2}+6\,\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{2}}{\sqrt{a}}} \right ) acd-7\,\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{2}}{\sqrt{a}}} \right ) a{d}^{2}+2\,\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{a}{c}^{2}-4\,\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{a}cd+10\,\sqrt{a-a\sin \left ( fx+e \right ) }\sqrt{a}{d}^{2} \right ) \sqrt{-a \left ( -1+\sin \left ( fx+e \right ) \right ) }{a}^{-{\frac{5}{2}}}{\frac{1}{\sqrt{a+a\sin \left ( fx+e \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (d \sin \left (f x + e\right ) + c\right )}^{2}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{\frac{3}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.69076, size = 953, normalized size = 6.91 \begin{align*} -\frac{\sqrt{2}{\left ({\left (c^{2} + 6 \, c d - 7 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, c^{2} - 12 \, c d + 14 \, d^{2} -{\left (c^{2} + 6 \, c d - 7 \, d^{2}\right )} \cos \left (f x + e\right ) -{\left (2 \, c^{2} + 12 \, c d - 14 \, d^{2} +{\left (c^{2} + 6 \, c d - 7 \, d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt{a} \log \left (-\frac{a \cos \left (f x + e\right )^{2} + 2 \, \sqrt{2} \sqrt{a \sin \left (f x + e\right ) + a} \sqrt{a}{\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )} + 3 \, a \cos \left (f x + e\right ) -{\left (a \cos \left (f x + e\right ) - 2 \, a\right )} \sin \left (f x + e\right ) + 2 \, a}{\cos \left (f x + e\right )^{2} -{\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) - 4 \,{\left (4 \, d^{2} \cos \left (f x + e\right )^{2} + c^{2} - 2 \, c d + d^{2} +{\left (c^{2} - 2 \, c d + 5 \, d^{2}\right )} \cos \left (f x + e\right ) +{\left (4 \, d^{2} \cos \left (f x + e\right ) - c^{2} + 2 \, c d - d^{2}\right )} \sin \left (f x + e\right )\right )} \sqrt{a \sin \left (f x + e\right ) + a}}{8 \,{\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f \cos \left (f x + e\right ) - 2 \, a^{2} f -{\left (a^{2} f \cos \left (f x + e\right ) + 2 \, a^{2} f\right )} \sin \left (f x + e\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 3.34741, size = 911, normalized size = 6.6 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]